<template>
    <svg class="icon" aria-hidden="true">
        <use :xlink:href="'#'+icon"></use>
    </svg>
</template>

<script>
export default {
    props: {
        icon: {
            default: 'ann-icon-zhaofuwu',
            type: String
        }
    },
    data() {
        return {

        }
    },
    mounted() {
        let s = document.getElementById('iconfont')
        // if (s) {
        //     s.remove()
        // }
        if (!s){
            s = document.createElement('script');
            s.id = 'iconfont'
            s.type = 'text/javascript';
            s.src = '//at.alicdn.com/t/font_2484345_l2iwj7qssk.js';
            document.body.appendChild(s);
        }
        
    }
}
</script>